package com.codebattery.service;

import com.codebattery.client.OrderServiceClient;
import com.codebattery.domain.model.UserOrderInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.concurrent.CompletableFuture;

@Service
public class CustomerService {
    @Autowired
    private OrderServiceClient orderServiceClient;

    @Async
    public CompletableFuture<List<Object>> getAllUserInfos(String userId){

        List<Object> all = orderServiceClient.getAll();

        return CompletableFuture.completedFuture(all);
    }

}
